package controller.services;

import java.util.List;

import model.bo.Article;
import model.bo.Articletype;
import model.bo.Contentus;
import model.bo.Dtable;
import model.bo.Manager;
import model.bo.SubTree;
import model.dao.IArticleDAO;
import model.dao.IManagerDAO;
import util.page.PageBean;

public interface IManagerServices {

	public abstract IManagerDAO getIManagerDAO();

	public abstract void setIManagerDAO(IManagerDAO managerDAO);

	public abstract void attachClean(Manager instance);

	public abstract void attachDirty(Manager instance);

	public abstract void delete(Manager persistentInstance);

	public abstract List findAll();

	public abstract List findByAdminname(Object adminname);

	public abstract List findByAdminpass(Object adminpass);

	public abstract List findByExample(Manager instance);

	public abstract Manager findById(Integer id);

	public abstract List findByLoginip(Object loginip);

	public abstract List findByProperty(String propertyName, Object value);

	public abstract Manager merge(Manager detachedInstance);

	public abstract void save(Manager transientInstance);

	public abstract Boolean checkuser(String name, String password);

	//查询属性带分页
	public abstract PageBean findByProperty(String propertyName, Object value,
			int pageSize, int page);

	//通过类型查找
	public abstract PageBean articlelist(String typeid, int pageSize, int page);
	//通过父类查询
	public PageBean articlelistByFatherID(String fatherid,int pageSize,int page);
	
	public abstract PageBean articlelist(String typeid, String condetions, int pageSize, int page);
	//保存文章
	public abstract Boolean save(Article transientInstance);
	//执行SQL删除
	public abstract Boolean delete(String arr);

	public abstract IArticleDAO getIArticleDAO();

	public abstract void setIArticleDAO(IArticleDAO articleDAO);
	//返回第一条记录
	public Contentus getContentus();
	//更新联系我们的记录
	public Boolean updateContentus(String contentValue);
	//获得所有的文章类型
	public List<Articletype> getAllArticleTypes();
	//获得单个文章类型对象
	public Articletype getArticleTypeById(String typeid);
	//获得单篇文章
	public Article getArticleById(Integer id);
	//子父分类排序
	public List<SubTree> getTypetree();
	//单独获得首页模块的分类
	public List<SubTree> getIndexType();
	//通过父ID获得子ID分类
	public List<Articletype> getChild(Integer fatherid);
	//查询表格列表
	public PageBean dtablelist(String typeid,int pageSize,int page);
	
	public Dtable findTableById(Integer id);
	
	public void createOrUpdate(Dtable transientInstance);
	
	public Boolean deletetalbe(Integer tableId);
	
	public PageBean dtablelist(int pageSize,int page);
	
	public List getAllTable();
	
	public List findTableByType(Integer typeid);
}